package org.eimac.imacquizz;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;

public class ContactActivity extends Activity {
	 
    /** Called when the activity is first created. */
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.contact);
        
        Bundle extra = getIntent().getExtras();
        String rubric = extra.getString("rubric");   
        
        Button boutonmail = (Button) findViewById(R.id.mail);
        boutonmail.setOnClickListener(new View.OnClickListener() { 
            
    	public void onClick(View v) {

			Intent myIntent = new Intent(v.getContext(), EmailActivity.class);
			myIntent.putExtra("rubric", "email");		
            startActivityForResult(myIntent, 0);
    	}

    	});
        
        Button boutonAcces = (Button) findViewById(R.id.acces);
        boutonAcces.setOnClickListener(new View.OnClickListener() { 
            
    	public void onClick(View v) {

			Intent myIntent = new Intent(v.getContext(), ImacMapActivity.class);
			myIntent.putExtra("rubric", "acces");		
            startActivityForResult(myIntent, 0);
    	}

    	});
        
        Button boutonMenu = (Button) findViewById(R.id.menu);
        boutonMenu.setOnClickListener(new View.OnClickListener() {
            public void onClick(View view) {
                Intent intent = new Intent();
                setResult(RESULT_OK, intent);
                finish();
            }

        });
        
        
    }
}
    
